<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<% String msg=((String)request.getAttribute("msg") == null)?"":(String)request.getAttribute("msg"); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>美嘉饲料</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link href="<%=basePath%>skin/css/global.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath%>skin/css/validform/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>skin/js/validform/Validform_v5.3.2_min.js"></script>
	<script language="javascript">
	 $().ready(function(){
		 $("#username").focus();
		 var validform = $("#form1").Validform();
		 validform.addRule([
			{
			    ele:"#username",
			    datatype:"*",
			    nullmsg:"请输入用户名！"
			},
			{
			    ele:"#password",
			    datatype:"*",
			    nullmsg:"请输入密码！"
			},
			{
			    ele:"#validateCode",
			    datatype:"n",
			    nullmsg:"请输入验证码！"
			}
      	 ]);
		 
		 $("#validateCodeImg").click(function(){
			 $(this).attr("src","<%=basePath%>/validateCode.shtml?data=" + new Date() + Math.floor(Math.random()*24));
		 });
	 });
	</script>
</head>
  
<body background="skin/images/loginBlockBg.jpg">
<div class="loginBlock">
	<div class="loginTable">
	<form action="<%=basePath%>admin/login/post.shtml" method="post" name="form1" id="form1">
	  <div class="loginBtnSubmit">
	    <input type="image"  src="/skin/images/btnLogin.gif" name="login" value="登录" id="login"/>
	  </div>
	  <div class="loginInput"> 用户名:
	    <input type="text" name="username" id="username" size="20"/>
	  </div>
	  <div class="loginInput"> 密&nbsp;&nbsp;&nbsp;&nbsp;码:
	    <input name="password" type="password" id="password" size="21" />
	  </div>
	  <div class="loginInputVC"> 验证码:
	    <input type="text" name="validateCode" id="validateCode"/>
	    <img id="validateCodeImg" src="<%=basePath%>validateCode.shtml" title="点击图片刷新验证码"/>
	  </div>
	  <!-- 
	  <div> 
	    <input type="checkbox" name="rememberMe" id="rememberMe" value="true"/> 记住我
	  </div> 
	  -->
	  <div class="loginInput"> 
	    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red" id="msg"><% if(!msg.equals("") && msg != null ){ out.println(msg); } %></font>
	  </div>
	</form>
	</div>
</div>
</body>
</html>
